import { useParams } from 'react-router-dom';
import OldIndex from './old-index';
import NewIndex from './new-index';

function App(): JSX.Element {
  const params: any = useParams();

  return (
    <div>
      {
        params.type === 'old' ? (
          <OldIndex />
        ) : (
          <NewIndex />
        )
      }
    </div>
  )
}

export default App
